<?php include "top.php"; ?>
<?php
		 $nid=make_safe($_GET["nid"]); 
		 if($nid==""){$nid=1;}
		 
		 if($nid==1){$nidname="公司樣本";}
		 if($nid==2){$nidname="禮服";}
		 if($nid==3){$nidname="客戶";}
		 
		 
		?>
      <div id="top-3">
        <div id="m-text-1">
        <table border="0" cellpadding="0" cellspacing="0" class="tab-5">
   <tr>
     <td valign="top"><div class="tab-5-tit">主功能列表</div>
     <div class="m-text-2_btn"><a href="category.php?nid=<?php echo $nid;?>">作品分類管理</a></div>
     
        <div class="tab-5-tit">相簿管理</div>
      
	 
	 <?php
  $n=1;

  $sql="select * from product_type_big where nid='$nid' order by orderid  ";			
	$result=mysql_query($sql);
	while ($row=mysql_fetch_object($result)){
	?>
     <div class="m-text-2_btn"><a href="working.php?nid=<?php echo $nid;?>&BigClassName=<?php echo urlencode($row->BigClassName);?>"><?php echo $row->BigClassName;?></a></div>
     <?php }?>
	
	
	
       </td>
   </tr>
   </table>
        </div>
		
		
		
		
		
		
        <div id="m-text-2_banner">
          <ul>
           
		   
		   
            <li>/ </li>
            <li><a href="category_add.php?nid=<?php echo $nid;?>">新增</a></li>
            <li><?php echo $nidname;?>作品分類管理</li>
          </ul>
        </div><div id="m-text-2">
		
		
		<script language="javascript">
	function check(form1){
		if(form1.BigClassName.value==""){
			alert("请输入 類別!");form1.BigClassName.focus();return false;		
		}
		
	}
</script>	
		
		
		<?php 
		$id=make_safe($_GET["id"]);
		$action=make_safe($_GET["action"]);
		$nid=make_safe($_GET["nid"]); 
		$BigClassName=make_safe($_POST["BigClassName"]);
		$orderid=make_safe($_POST["orderid"]); 
		
		if($action=="xiugai"){
		

if($query=mysql_query("update product_type_big set BigClassName='$BigClassName',orderid='$orderid' where id='$id'"))

{
   echo "<script>alert('資料修改成功！');window.location.href='category.php?nid=".$nid."&SmallClassName=".$SmallClassName."&page=".$page."';</script>";
 }
 
 else
  {
   echo "<script>alert('資料修改失敗！');window.location.href='category.php?nid=".$nid."&SmallClassName=".$SmallClassName."&page=".$page."';</script>";
  }
}




		
		

		
		
		
		
		?>
		
		
		
		
		<?PHP
 	$id=make_safe($_GET["id"]);	 
    $sql="select * from product_type_big where id='$id' order by id desc";			
	$result=mysql_query($sql);
	while ($row=mysql_fetch_object($result)){
?>
		
		<form name="form1" action="?action=xiugai&nid=<?php echo $row->nid;?>&id=<?php echo $row->id;?>" method="post">
<table border="0" cellpadding="0" cellspacing="0" class="m-text-2-con">
          <tr>
		  <td class="m-text-2-con3">&nbsp;</td>
            <td class="m-text-2-con3">&nbsp;</td>
            <td class="m-text-2-con3">類別</td>
            <td class="m-text-2-con3">&nbsp;</td>
			<td class="m-text-2-con3">&nbsp;</td>
			<td class="m-text-2-con3">排序</td>
        </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="m-text-2-con">
          <tr>
            
            <td class="m-text-2-con3">
              <input name="BigClassName" type="text"  size="30" value="<?php echo $row->BigClassName;?>" />
			 </td>
            <td class="m-text-2-con3"><input name="orderid" type="text"  value="<?php echo $row->orderid;?>" size="2"/></td>
            </tr>
</table>



<table border="0" cellpadding="0" cellspacing="0" class="m-text-2-con">
  <tr>
    <td class="m-text-2-con1"><label for="checkbox6"></label></td>
    <td class="m-text-2-con2"><input type="submit" name="button" id="button" value="修改"  onClick="return check(form1);"  /></td>
    <td class="m-text-2-con3"><label for="textfield5"></label></td>
  </tr>
</table>
</form>
<?php }?>




        </div>
      </div>
    </div>
  </div>
</div>
<div id="botton"><div id="copyright"><table border="0" cellpadding="0" cellspacing="0" class="copy">
  <tr>
    <td>© COPYRIGHTS 2010 INC. APARTMENT STUDIO All rights reserved.</td>
  </tr>
</table>
</div></div>
</body>
</html>